﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Entities;

namespace WebUI.Models
{
    public abstract class BaseFilterModel
    {
        private Dictionary<string, bool> _columns;
        private FilterOperations _filesFilter;
        private byte[] _chart;

        public BaseFilterModel()
        {
            _columns = new Dictionary<string, bool> 
            {
                {"ID",true},
                {"ReceivedTime",false},
                {"FileType",false},
                {"RenameToPath",false},
                {"RenamedObjectName",false},
                {"RenamedFileType",false},
                {"FileSize",false},
                {"PolicyName",false},
                {"ShareName",false},
                {"ClientMachineIP",false},
                {"ClientMachineName",false},
                {"PrevOwnerSID",false},
                {"PrevOwnerAccount",false},
                {"PrevOwnerDomain",false},
                {"IsDir",false},
                {"OperationName",false}
            };
        }

        public FilterOperations FilesFilter
        {
            get
            {
                _filesFilter = _filesFilter ?? new FilterOperations();
                return _filesFilter;
            }
            set { _filesFilter = value; }
        }

        public int TotalCount { get; set; }

        public byte[] Chart
        {
            get
            {
                _chart = _chart ?? new byte[] { };
                return _chart;
            }
            set { _chart = value; }
        }

        public Dictionary<string, bool> Columns
        {
            get
            {
                return _columns;
            }
            set
            {
                _columns = value;
            }
        }

    }
}